package com.polaris.live.adapter

import com.polaris.live.common.adapter.BaseBindingAdapter
import com.polaris.live.common.adapter.VBViewHolder
import com.polaris.live.databinding.AdapterContributorsBinding
import com.polaris.live.resp.back_resp.Rank
import com.polaris.live.widget.avatar.FrameImageUtils

/**
 * ContributorsAdapter 贡献者adapter
 *
 * @author Created by 天晴 on 2024/5/29/004 12:03
 */
class ContributorsAdapter : BaseBindingAdapter<AdapterContributorsBinding, Rank>() {

    override fun convert(holder: VBViewHolder<AdapterContributorsBinding>, item: Rank) {

        holder.vb.apply {
            blockItemHead.setImageUrl(item.user.avatar)
            avFv.setFrameImage(FrameImageUtils.urlToFrameImageBean(item.user.avatarFrame))
        }
    }

}